using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mvc;
using GeYiHome.PublicLibrary;

namespace GeYiHome.OpenApi.Controllers
{
    public class NlController:Controller
    {
        public JsonResult Ok<T>(T obj)
        {
            var result = new NlResult<T>(obj);
            var content = new JsonResult()
            {
                Data = result,
                ContentType = "application/json",
                ContentEncoding = Encoding.UTF8,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
            return content;
        }
    }
}